<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 7.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/ME.ico">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/ME.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/ME.ico">
  <link rel="mask-icon" href="/images/ME.ico" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"www.zhoubencheng.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":true,"style":"mac"},"back2top":{"enable":true,"sidebar":false,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="1. 常用CUDA关键字 函数修饰词  __global__：修饰的函数只能返回void类型，并且函数在CPU端调用，在GPU端执行 __device__：在GPU端调用并执行 __host__：在CPU端调用并执行">
<meta property="og:type" content="article">
<meta property="og:title" content="cuda编程">
<meta property="og:url" content="http://www.zhoubencheng.com/2024/08/16/cuda%E7%BC%96%E7%A8%8B/index.html">
<meta property="og:site_name" content="Benson&#39;s blog">
<meta property="og:description" content="1. 常用CUDA关键字 函数修饰词  __global__：修饰的函数只能返回void类型，并且函数在CPU端调用，在GPU端执行 __device__：在GPU端调用并执行 __host__：在CPU端调用并执行">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://www.uml.org.cn/embeded/images/2018082024.jpg">
<meta property="og:image" content="https://ashburnlee.github.io/2020/02/20/CUDA-%E4%BE%8B-%E8%A7%84%E7%BA%A6/reduction0.png">
<meta property="og:image" content="https://ashburnlee.github.io/2020/02/20/CUDA-%E4%BE%8B-%E8%A7%84%E7%BA%A6/reduction1.png">
<meta property="og:image" content="https://i-blog.csdnimg.cn/blog_migrate/d461ea452d97a49324f58c60c1965dc7.png">
<meta property="article:published_time" content="2024-08-16T12:12:07.000Z">
<meta property="article:modified_time" content="2024-08-19T20:13:42.196Z">
<meta property="article:author" content="Benson">
<meta property="article:tag" content="高性能计算">
<meta property="article:tag" content="cuda">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://www.uml.org.cn/embeded/images/2018082024.jpg">

<link rel="canonical" href="http://www.zhoubencheng.com/2024/08/16/cuda%E7%BC%96%E7%A8%8B/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>cuda编程 | Benson's blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>


<style>.github-emoji { position: relative; display: inline-block; width: 1.2em; min-height: 1.2em; overflow: hidden; vertical-align: top; color: transparent; }  .github-emoji > span { position: relative; z-index: 10; }  .github-emoji img, .github-emoji .fancybox { margin: 0 !important; padding: 0 !important; border: none !important; outline: none !important; text-decoration: none !important; user-select: none !important; cursor: auto !important; }  .github-emoji img { height: 1.2em !important; width: 1.2em !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; user-select: none !important; cursor: auto !important; } .github-emoji-fallback { color: inherit; } .github-emoji-fallback img { opacity: 0 !important; }</style>
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Benson's blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">最好的安排</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

  <a href="https://github.com/ZhouBencheng" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://www.zhoubencheng.com/2024/08/16/cuda%E7%BC%96%E7%A8%8B/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/ME.ico">
      <meta itemprop="name" content="Benson">
      <meta itemprop="description" content="Share my thoughts with you">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Benson's blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          cuda编程
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2024-08-16 20:12:07" itemprop="dateCreated datePublished" datetime="2024-08-16T20:12:07+08:00">2024-08-16</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2024-08-20 04:13:42" itemprop="dateModified" datetime="2024-08-20T04:13:42+08:00">2024-08-20</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E9%AB%98%E6%80%A7%E8%83%BD%E8%AE%A1%E7%AE%97/" itemprop="url" rel="index"><span itemprop="name">高性能计算</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h2 id="常用cuda关键字">1. 常用CUDA关键字</h2>
<h3 id="函数修饰词">函数修饰词</h3>
<ul>
<li><code>__global__</code>：修饰的函数只能返回<code>void</code>类型，并且函数在CPU端调用，在GPU端执行</li>
<li><code>__device__</code>：在GPU端调用并执行</li>
<li><code>__host__</code>：在CPU端调用并执行</li>
</ul>
<span id="more"></span>
<h3 id="变量修饰词">变量修饰词</h3>
<ul>
<li><code>__global__</code>：修饰的变量将存储在GPU的全局内存区域，Nvidia
GPU内存模型详见下部分</li>
<li><code>__shared__</code>：修饰的变量将存储在线程块的共享内存区域</li>
</ul>
<h3 id="内置变量">内置变量</h3>
<ul>
<li><p><code>dim3</code>：cuda内置的结构体类型，其成员变量包含<strong>三个</strong><code>unsigned int</code>，用于描述三维向量上三个维度的大小，使用时</p>
<figure class="highlight c"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dim3 <span class="title function_">grid_dim</span><span class="params">(num1, num2, num3)</span>;</span><br></pre></td></tr></tbody></table></figure></li>
</ul>
<h2 id="cuda内存模型">2. CUDA内存模型</h2>
<p>CUDA代码运行的GPU中，其<strong>线程模型</strong>可以分为以下几个层次，由上及下依次为从小到大的包含关系</p>
<ul>
<li><code>threads</code>：GPU执行指令的基本单位，其布局在线程块<code>block</code>中用<code>dim3</code>类型的<code>block_dim</code>描述</li>
<li><code>block</code>：线程块，用于容纳若干线程（线程布局在调用<code>__global__</code>函数时，在<code>&lt;&lt;&lt; , &gt;&gt;&gt;</code>中定义），其在网格<code>grid</code>中的布局用<code>dim3</code>类型的<code>grid_dim</code>描述</li>
<li><code>grid</code>：网格，用于容纳若干线程块，同样在调用<code>__global__</code>函数时在<code>&lt;&lt;&lt; , &gt;&gt;&gt;</code>中定义</li>
</ul>
<p>而cuda代码运行的内存模型有以下几类</p>
<ul>
<li><code>registers</code>：线程专有，为不带修饰词的变量使用</li>
<li><code>local memory</code>：局部内存，和寄存器一样为线程专有</li>
<li><code>shared memory</code>：每个线程块<code>block</code>专有的共享内存，线程块内所有的线程共享这片内存</li>
<li><code>global memory</code>：每个<code>grid</code>都有自己的全局内存，为每个<code>block</code>的所有<code>thread</code>共有</li>
<li><code>constant memory</code>：常量内存，为<code>grid</code>所有，只读</li>
<li><code>texture memory</code>：纹理内存，为<code>grid</code>所有，只读。是cuda主要针对2D数据访问优化的全局聂村区域</li>
</ul>
<p><img src="http://www.uml.org.cn/embeded/images/2018082024.jpg"></p>
<h2 id="规约算法">3. 规约算法</h2>
<p>规约，是指对输入的N个元素进行满足<strong>结合律</strong>的运算，其特点是各元素之间的结合计算顺序不影响最终计算结果</p>
<h3 id="交叉规约">交叉规约</h3>
<p>以线程束(warp)为2的情况为例，这种并行规约方法会导致线程束发散(warp
deconvergence)。因为线程束是一组在同一时间步中执行相同步骤的线程，所以不同的线程经过<strong>条件分支</strong>执行不同的指令会导致线程束发散，导致执行效率变低</p>
<p><img src="https://ashburnlee.github.io/2020/02/20/CUDA-%E4%BE%8B-%E8%A7%84%E7%BA%A6/reduction0.png"></p>
<figure class="highlight c"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">__global__ <span class="title function_">func</span><span class="params">()</span> {</span><br><span class="line">	__shared__ <span class="type">float</span> smem[];</span><br><span class="line">  <span class="comment">// 将数据存储在共享内存中</span></span><br><span class="line">  </span><br><span class="line">  <span class="type">int</span> x = threadidx.x; <span class="comment">//只有一个block就直接取threadidx.x</span></span><br><span class="line">  </span><br><span class="line">  <span class="keyword">for</span> (<span class="type">int</span> step = <span class="number">1</span>; step &lt; blockDim.x; step *= <span class="number">2</span>) {</span><br><span class="line">    <span class="keyword">if</span> (x % (step*<span class="number">2</span>) == <span class="number">0</span>)</span><br><span class="line">      smem[x] += smem[x + step];</span><br><span class="line">    <span class="comment">// 一层中求和结束后才能进行下一层运算</span></span><br><span class="line">  	__syncthreads();</span><br><span class="line">  } </span><br><span class="line">}</span><br></pre></td></tr></tbody></table></figure>
<h3 id="交错规约">交错规约</h3>
<p>该规约方法满足warp运行的特性，当橙色框中存在某一个warp中的所有线程都没有任务时，就可以整体释放资源。当<code>warp=2</code>，该图中所有并行运算都能够提前释放资源</p>
<p><img src="https://ashburnlee.github.io/2020/02/20/CUDA-%E4%BE%8B-%E8%A7%84%E7%BA%A6/reduction1.png"></p>
<h3 id="shuffle-warp规约"><code>shuffle warp</code>规约</h3>
<p>cuda存在内置<code>warp函数</code>，该函数中warp中的线程之间可以高效的交换数据（不使用共享内存，直接通过寄存器）</p>
<figure class="highlight c"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">val += __shfl_down_sync(mask, val, offset, warpSize);</span><br></pre></td></tr></tbody></table></figure>
<p><code>__shfl_up_sync</code>函数参数和<code>__shfl_down_sync</code>相同，但它是将数据从低索引向高索引的元素上传递</p>
<p><img src="https://i-blog.csdnimg.cn/blog_migrate/d461ea452d97a49324f58c60c1965dc7.png"></p>

    </div>

    
    
    

      <footer class="post-footer">
          
          <div class="post-tags">
              <a href="/tags/%E9%AB%98%E6%80%A7%E8%83%BD%E8%AE%A1%E7%AE%97/" rel="tag"><i class="fa fa-tag"></i> 高性能计算</a>
              <a href="/tags/cuda/" rel="tag"><i class="fa fa-tag"></i> cuda</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2024/08/06/RISCV%E5%90%91%E9%87%8F%E6%89%A9%E5%B1%95/" rel="prev" title="RISCV向量扩展">
      <i class="fa fa-chevron-left"></i> RISCV向量扩展
    </a></div>
      <div class="post-nav-item">
    <a href="/2024/08/21/%E9%87%8F%E5%8C%96%E5%92%8C%E5%8F%8D%E9%87%8F%E5%8C%96-pytorch/" rel="next" title="量化和反量化-pytorch">
      量化和反量化-pytorch <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%B8%B8%E7%94%A8cuda%E5%85%B3%E9%94%AE%E5%AD%97"><span class="nav-number">1.</span> <span class="nav-text">1. 常用CUDA关键字</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%87%BD%E6%95%B0%E4%BF%AE%E9%A5%B0%E8%AF%8D"><span class="nav-number">1.1.</span> <span class="nav-text">函数修饰词</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%8F%98%E9%87%8F%E4%BF%AE%E9%A5%B0%E8%AF%8D"><span class="nav-number">1.2.</span> <span class="nav-text">变量修饰词</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%86%85%E7%BD%AE%E5%8F%98%E9%87%8F"><span class="nav-number">1.3.</span> <span class="nav-text">内置变量</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#cuda%E5%86%85%E5%AD%98%E6%A8%A1%E5%9E%8B"><span class="nav-number">2.</span> <span class="nav-text">2. CUDA内存模型</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%A7%84%E7%BA%A6%E7%AE%97%E6%B3%95"><span class="nav-number">3.</span> <span class="nav-text">3. 规约算法</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%A4%E5%8F%89%E8%A7%84%E7%BA%A6"><span class="nav-number">3.1.</span> <span class="nav-text">交叉规约</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%A4%E9%94%99%E8%A7%84%E7%BA%A6"><span class="nav-number">3.2.</span> <span class="nav-text">交错规约</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#shuffle-warp%E8%A7%84%E7%BA%A6"><span class="nav-number">3.3.</span> <span class="nav-text">shuffle warp规约</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Benson"
      src="/images/ME.ico">
  <p class="site-author-name" itemprop="name">Benson</p>
  <div class="site-description" itemprop="description">Share my thoughts with you</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">17</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">7</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">25</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/ZhouBencheng" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;ZhouBencheng" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:zhoubencheng2022@163.com" title="E-Mail → mailto:zhoubencheng2022@163.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Benson</span>
</div>

<!--
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动
  </div>
-->

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>


  <script defer src="/lib/three/three.min.js"></script>
    <script defer src="/lib/three/canvas_lines.min.js"></script>


  













<script>
if (document.querySelectorAll('pre.mermaid').length) {
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js', () => {
    mermaid.initialize({
      theme    : 'dark',
      logLevel : 3,
      flowchart: { curve     : 'linear' },
      gantt    : { axisFormat: '%m/%d/%Y' },
      sequence : { actorMargin: 50 }
    });
  }, window.mermaid);
}
</script>


  

  

  

</body>
</html>
